<!DOCTYPE html>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <style type="text/css">
	  @import url(/resources/css/style.css);
	</style>
    
    <script type="text/javascript" src="/resources/js/jquery-1.6.2.js"></script>
    <script type="text/javascript" src="/resources/js/functions.js"></script>
    <script type="text/javascript" src="/resources/js/event.js"></script>
    
    <title><fmt:message key="application.welcome"/></title>
  </head>
  <body>
	<div class="bloc">
	  	<div class="main-top">
	  	</div>
	  	<div class="main-bloc">
	  		<a href="/logout"><fmt:message key="user.logout"></fmt:message></a>
	  		<a href="/home">Back</a>
	  		<br/>
	  		<form:form method="post" commandName="eventForm" action="${eventForm.action}">
	  			Step ${eventForm.step}...<br/>
	  			<c:if test="${eventForm.step==1}">
	  				<form:label path="name"><fmt:message key="event.name"/></form:label>
			        <form:input path="name" />
			        <form:label path="description"><fmt:message key="event.description"/></form:label>
			        <form:textarea path="description"/>
			        <form:input path="userGuests[0]" class="guest" value=""/>
	  			</c:if>
	  			<c:if test="${eventForm.step>=2}">
	  				<form:hidden path="name"/>
	  				<form:hidden path="description"/>
	  				<c:set var="compteur" value="${0}"></c:set>
	  				<c:forEach var="guest" items="${eventForm.userGuests}">
	  					<input type="hidden" name="userGuests[${compteur}]" value="${guest}"/>
	  					<c:set var="compteur" value="${compteur+1}"></c:set>
	  				</c:forEach>
	  			</c:if>BLOU
	  			<c:if test="${eventForm.step==2}">
	  				The Map
	  			</c:if>
		        <input type="submit" value="create"/>
		    </form:form>
		  	<br/>
		</div>
		
		<div class="main-bottom"></div>
	</div>
	<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=<fmt:message key="google.map.key"/>" type="text/javascript"></script>
  </body>
</html>
